

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>CP2K I/O and driver &mdash; quippy 7ea04c5+ documentation</title>
  

  
  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "math|output_area", "processEscapes": true, "ignoreClass": "document", "inlineMath": [["$", "$"], ["\\(", "\\)"]]}})</script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Elasticity calculations" href="elasticity.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> quippy
          

          
            
            <img src="_static/hybrid.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                7ea04c5+
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
    
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to <code class="docutils literal notranslate"><span class="pre">quippy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation of QUIP and quippy</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="quippy.html">Quippy library reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quippy.html#core-functionality">Core functionality</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#structure-generation-manipulation-and-analysis">Structure generation, manipulation and analysis</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#molecular-dynamics">Molecular Dynamics</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="quippy.html#additional-tools-for-potentials">Additional tools for Potentials</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">CP2K I/O and driver</a></li>
<li class="toctree-l3"><a class="reference internal" href="elasticity.html">Elasticity calculations</a></li>
<li class="toctree-l3"><a class="reference internal" href="polarization.html">Tools for polarizable potentials</a></li>
<li class="toctree-l3"><a class="reference internal" href="electrostaticembed.html">Tools for electrostatic embedding</a></li>
<li class="toctree-l3"><a class="reference internal" href="phonons.html">Phonon calculation</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#mathematical-and-optimisation-tools">Mathematical and optimisation tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#units-data-and-constants">Units, Data and Constants</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#low-level-routines-and-datatypes">Low level routines and datatypes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="visualisation.html">Visualisation Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a></li>
<li class="toctree-l1"><a class="reference internal" href="teach_sparse.html">Command line options of the teach_sparse main program</a></li>
</ul>

            
          
    <p></p>
    <ul>
        <li><a href="genindex.html">Index</a></li>
        <li><a href="py-modindex.html">Module Index</a></li>
        <li><a href="search.html">Search Page</a></li>
        <li><a href="_modules/index.html">Module Source Code</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">quippy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
          <li><a href="quippy.html">Quippy library reference</a> &raquo;</li>
        
      <li>CP2K I/O and driver</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/cp2k.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  
<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
    margin-bottom: 19px;  /* padding has already 5px */
}

/* ... except between code cells! */
.nblast + .nbinput {
    margin-top: -19px;
}

.admonition > p:before {
    margin-right: 4px;  /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
    text-align: unset;
}
</style>
<div class="section" id="module-quippy.cp2k">
<span id="cp2k-i-o-and-driver"></span><span id="cp2k"></span><h1>CP2K I/O and driver<a class="headerlink" href="#module-quippy.cp2k" title="Permalink to this headline">¶</a></h1>
<p>Module contents for <a class="reference internal" href="#module-quippy.cp2k" title="quippy.cp2k: CP2K I/O"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy.cp2k</span></code></a>:</p>
<p class="rubric">Classes</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.cp2k.CP2KPotential" title="quippy.cp2k.CP2KPotential"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CP2KPotential</span></code></a>([fpointer,&nbsp;finalise,&nbsp;error])</td>
<td>QUIP Potential interface to the CP2K code.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.cp2k.CP2KInputHeader" title="quippy.cp2k.CP2KInputHeader"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CP2KInputHeader</span></code></a>([filename])</td>
<td>Read a cp2k_input.inp.header file and parse into an ordered dictionary.</td>
</tr>
</tbody>
</table>
<p class="rubric">Functions</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.cp2k.read_cp2k_qm_kind" title="quippy.cp2k.read_cp2k_qm_kind"><code class="xref py py-obj docutils literal notranslate"><span class="pre">read_cp2k_qm_kind</span></code></a>(fh)</td>
<td>Read a file in cp2k_input.qmmm_qm_kind</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.cp2k.read_psf" title="quippy.cp2k.read_psf"><code class="xref py py-obj docutils literal notranslate"><span class="pre">read_psf</span></code></a>(psf[,&nbsp;rev_sort_index])</td>
<td>Read the PSF topology file from the filename <cite>psf</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.cp2k.apply_cp2k_sort_order" title="quippy.cp2k.apply_cp2k_sort_order"><code class="xref py py-obj docutils literal notranslate"><span class="pre">apply_cp2k_sort_order</span></code></a>(at[,&nbsp;…])</td>
<td>Reorder atoms in <cite>at</cite> so that they match rev_sort_index read from file.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.cp2k.bonds_from_avgpos" title="quippy.cp2k.bonds_from_avgpos"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bonds_from_avgpos</span></code></a>(at)</td>
<td>Compute connectivity of <cite>at</cite> using <cite>avgpos</cite> positions.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.cp2k.qmmm_link_bonds" title="quippy.cp2k.qmmm_link_bonds"><code class="xref py py-obj docutils literal notranslate"><span class="pre">qmmm_link_bonds</span></code></a>(at[,&nbsp;run_suffix])</td>
<td>Return the set of QM/MM link bonds in <cite>at</cite>.</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="quippy.cp2k.CP2KPotential">
<em class="property">class </em><code class="descclassname">quippy.cp2k.</code><code class="descname">CP2KPotential</code><span class="sig-paren">(</span><em>fpointer=None</em>, <em>finalise=True</em>, <em>error=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/cp2k.html#CP2KPotential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.cp2k.CP2KPotential" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="potential.html#quippy.potential.Potential" title="quippy.potential.Potential"><code class="xref py py-class docutils literal notranslate"><span class="pre">quippy.potential.Potential</span></code></a></p>
<p>QUIP Potential interface to the CP2K code.</p>
<p>Calls do_cp2k_calc() in QUIP_FilePot_Drivers/cp2k_driver_module.f95 to do the heavy lifting</p>
</dd></dl>

<dl class="class">
<dt id="quippy.cp2k.CP2KInputHeader">
<em class="property">class </em><code class="descclassname">quippy.cp2k.</code><code class="descname">CP2KInputHeader</code><span class="sig-paren">(</span><em>filename=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/cp2k.html#CP2KInputHeader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.cp2k.CP2KInputHeader" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">quippy.ordereddict.OrderedDict</span></code></p>
<p>Read a cp2k_input.inp.header file and parse into an ordered dictionary.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k.read_cp2k_qm_kind">
<code class="descclassname">quippy.cp2k.</code><code class="descname">read_cp2k_qm_kind</code><span class="sig-paren">(</span><em>fh</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/cp2k.html#read_cp2k_qm_kind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.cp2k.read_cp2k_qm_kind" title="Permalink to this definition">¶</a></dt>
<dd><p>Read a file in cp2k_input.qmmm_qm_kind</p>
<p>This is the format produced by the QUIP cp2k_driver.
Returns a list of tuples (qm_kind, atom_indices).</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k.read_psf">
<code class="descclassname">quippy.cp2k.</code><code class="descname">read_psf</code><span class="sig-paren">(</span><em>psf</em>, <em>rev_sort_index=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/cp2k.html#read_psf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.cp2k.read_psf" title="Permalink to this definition">¶</a></dt>
<dd><p>Read the PSF topology file from the filename <cite>psf</cite>.</p>
<p>Returns a pair of lists <cite>(bonds, angles)</cite>. <cite>bonds</cite> is a list
of pairs of bonded atom indices <cite>(i, j)</cite> and <cite>angles</cite> is a list
of triplets <cite>(i, j, k)</cite>. Order is same as that in PSF file</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k.apply_cp2k_sort_order">
<code class="descclassname">quippy.cp2k.</code><code class="descname">apply_cp2k_sort_order</code><span class="sig-paren">(</span><em>at</em>, <em>rev_sort_index_filename='quip_rev_sort_index'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/cp2k.html#apply_cp2k_sort_order"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.cp2k.apply_cp2k_sort_order" title="Permalink to this definition">¶</a></dt>
<dd><p>Reorder atoms in <cite>at</cite> so that they match rev_sort_index read from file.</p>
<p>Returns sort_index and rev_sort_index arrays.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k.bonds_from_avgpos">
<code class="descclassname">quippy.cp2k.</code><code class="descname">bonds_from_avgpos</code><span class="sig-paren">(</span><em>at</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/cp2k.html#bonds_from_avgpos"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.cp2k.bonds_from_avgpos" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute connectivity of <cite>at</cite> using <cite>avgpos</cite> positions.</p>
<p>A copy of <cite>at</cite> is made to avoid changing its connect
object. Returns list of bonds as a set.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k.qmmm_link_bonds">
<code class="descclassname">quippy.cp2k.</code><code class="descname">qmmm_link_bonds</code><span class="sig-paren">(</span><em>at</em>, <em>run_suffix=''</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/cp2k.html#qmmm_link_bonds"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.cp2k.qmmm_link_bonds" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the set of QM/MM link bonds in <cite>at</cite>.</p>
<p>Bonds are computed from average positions using <cite>bonds_from_avgpos()</cite>.
<cite>run_suffix</cite> is used to find the relevant <cite>cluster_mark</cite> property.</p>
</dd></dl>

<span class="target" id="module-quippy.cp2k_driver"></span><p>guts of cp2k driver from template</p>
<p>Module contents for <a class="reference internal" href="#module-quippy.cp2k_driver" title="quippy.cp2k_driver: CP2K Interface"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy.cp2k_driver</span></code></a>:</p>
<p class="rubric">Functions</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.cp2k_driver.calc_charge_lsd" title="quippy.cp2k_driver.calc_charge_lsd"><code class="xref py py-obj docutils literal notranslate"><span class="pre">calc_charge_lsd</span></code></a>(…)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.cp2k_driver.do_cp2k_calc" title="quippy.cp2k_driver.do_cp2k_calc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">do_cp2k_calc</span></code></a>(at,args_str,n0,n1,[error])</td>
<td><p class="rubric">args_str options</p>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.cp2k_driver.read_output" title="quippy.cp2k_driver.read_output"><code class="xref py py-obj docutils literal notranslate"><span class="pre">read_output</span></code></a>(…)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.cp2k_driver.cp2k_state_change" title="quippy.cp2k_driver.cp2k_state_change"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cp2k_state_change</span></code></a>(…)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.cp2k_driver.qmmm_qm_abc" title="quippy.cp2k_driver.qmmm_qm_abc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">qmmm_qm_abc</span></code></a>(at,qm_list_a,qm_vacuum)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="function">
<dt id="quippy.cp2k_driver.calc_charge_lsd">
<code class="descclassname">quippy.cp2k_driver.</code><code class="descname">calc_charge_lsd</code><span class="sig-paren">(</span><em>at</em>, <em>qm_list_a</em>, <em>n_hydrogen</em>, <em>hydrogen_charge</em>, <em>n_extra_electrons</em>, <em>use_mm_charges</em><span class="optional">[</span>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.cp2k_driver.calc_charge_lsd" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>qm_list_a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0)</span></dt>
<dd></dd>
<dt><strong>charge</strong> <span class="classifier-delimiter">:</span> <span class="classifier">int</span></dt>
<dd></dd>
<dt><strong>do_lsd</strong> <span class="classifier-delimiter">:</span> <span class="classifier">int</span></dt>
<dd></dd>
<dt><strong>n_hydrogen</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>hydrogen_charge</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>n_extra_electrons</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>use_mm_charges</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">calc_charge_lsd</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/FilePot_drivers/cp2k_driver_module.f95">src/FilePot_drivers/cp2k_driver_module.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k_driver.do_cp2k_calc">
<code class="descclassname">quippy.cp2k_driver.</code><code class="descname">do_cp2k_calc</code><span class="sig-paren">(</span><em>at</em>, <em>args_str</em>, <em>n0</em>, <em>n1</em><span class="optional">[</span>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.cp2k_driver.do_cp2k_calc" title="Permalink to this definition">¶</a></dt>
<dd><p class="rubric">args_str options</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="5%" />
<col width="21%" />
<col width="44%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Type</th>
<th class="head">Default</th>
<th class="head">Comments</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>MM_param_file</td>
<td>str</td>
<td>None</td>
<td>If tmp_run_dir&gt;0, where to find MM
parameter file to copy it to the cp2k
run dir on /tmp.</td>
</tr>
<tr class="row-odd"><td>PSF_print</td>
<td>str</td>
<td>NO_PSF</td>
<td>When to print PSF file: NO_PSF,
DRIVER_PRINT_AND_SAVE, USE_EXISTING_PSF</td>
</tr>
<tr class="row-even"><td>QM_basis_file</td>
<td>str</td>
<td>None</td>
<td>If tmp_run_dir&gt;0, where to find QM
BASIS_SET file to copy it to the cp2k
run dir on /tmp.</td>
</tr>
<tr class="row-odd"><td>QM_potential_file</td>
<td>str</td>
<td>None</td>
<td>If tmp_run_dir&gt;0, where to find QM
POTENTIAL file to copy it to the cp2k
run dir on /tmp.</td>
</tr>
<tr class="row-even"><td>Run_Type</td>
<td>str</td>
<td>PARAM_MANDATORY</td>
<td>Type of run QS, MM, or QMMM</td>
</tr>
<tr class="row-odd"><td>auto_centre</td>
<td>bool</td>
<td>False</td>
<td>If true, automatically center
configuration. May cause energy/force
fluctuations. Mutually exclusive with
centre_pos</td>
</tr>
<tr class="row-even"><td>break_bond</td>
<td>int</td>
<td>0 0</td>
<td>Bond to break (for EVB)</td>
</tr>
<tr class="row-odd"><td>centre_pos</td>
<td>float</td>
<td>0.0 0.0 0.0</td>
<td>Position to center around, mutually
exclusive with auto_centre</td>
</tr>
<tr class="row-even"><td>clean_up_files</td>
<td>bool</td>
<td>True</td>
<td>If true, clean up run directory files</td>
</tr>
<tr class="row-odd"><td>clean_up_keep_n</td>
<td>int</td>
<td>1</td>
<td>Number of old run directories to keep
if cleaning up</td>
</tr>
<tr class="row-even"><td>cp2k_calc_fake</td>
<td>bool</td>
<td>False</td>
<td>If true, do fake cp2k runs that just
read from old output files</td>
</tr>
<tr class="row-odd"><td>cp2k_program</td>
<td>str</td>
<td>PARAM_MANDATORY</td>
<td>Path to cp2k executable</td>
</tr>
<tr class="row-even"><td>cp2k_template_file</td>
<td>str</td>
<td>cp2k_input.template</td>
<td>Filename for cp2k input template</td>
</tr>
<tr class="row-odd"><td>create_residue_labels</td>
<td>bool</td>
<td>True</td>
<td>If true, recreate residue labels each
time PSF file is generated (default T)</td>
</tr>
<tr class="row-even"><td>do_mom_cons</td>
<td>bool</td>
<td>True</td>
<td>Do we need momentum conservation?</td>
</tr>
<tr class="row-odd"><td>force_run_dir_i</td>
<td>int</td>
<td>-1</td>
<td>If &gt; 0, force to run in this # run
directory</td>
</tr>
<tr class="row-even"><td>form_bond</td>
<td>int</td>
<td>0 0</td>
<td>Extra bond to form (for EVB)</td>
</tr>
<tr class="row-odd"><td>have_silica_potential</td>
<td>bool</td>
<td>False</td>
<td>If true, use 2.8A SILICA_CUTOFF for the
connectivities</td>
</tr>
<tr class="row-even"><td>have_titania_potential</td>
<td>bool</td>
<td>False</td>
<td>If true, use 2.8A TITANIA_CUTOFF for
the connectivities</td>
</tr>
<tr class="row-odd"><td>max_force_warning</td>
<td>float</td>
<td>2.0</td>
<td>Generate warning if any force is larger
than this</td>
</tr>
<tr class="row-even"><td>max_n_tries</td>
<td>int</td>
<td>2</td>
<td>Max number of times to run cp2k on
failure</td>
</tr>
<tr class="row-odd"><td>persistent</td>
<td>bool</td>
<td>False</td>
<td>If true, use persistent connection to
cp2k with REFTRAJ</td>
</tr>
<tr class="row-even"><td>persistent_max_wait_time</td>
<td>float</td>
<td>600.0</td>
<td>Max amount of time in s to wait for
forces to be available in persistent
mode</td>
</tr>
<tr class="row-odd"><td>persistent_restart_interval</td>
<td>int</td>
<td>100</td>
<td>How often to restart cp2k for
persistent connection</td>
</tr>
<tr class="row-even"><td>qm_charges</td>
<td>str</td>
<td>None</td>
<td>If not blank, name of property to put
QM charges in</td>
</tr>
<tr class="row-odd"><td>qm_vacuum</td>
<td>float</td>
<td>6.0</td>
<td>Amount of vacuum to add to size of qm
region in hybrid (and nonperiodic?)
runs</td>
</tr>
<tr class="row-even"><td>qmmm_link_fix_pbc</td>
<td>bool</td>
<td>True</td>
<td>If true (default) move outer atoms in
any QM links which straddle a periodic
boundary so link is continous</td>
</tr>
<tr class="row-odd"><td>qmmm_link_n_electrons</td>
<td>int</td>
<td>1</td>
<td>Number of electrons to add per QM-MM
link when qmmm_link_type=QM_KIND</td>
</tr>
<tr class="row-even"><td>qmmm_link_qm_kind</td>
<td>str</td>
<td>OSTAR</td>
<td>QM kind to use for inner boundary atoms
when qmmm_link_type=QM_KIND</td>
</tr>
<tr class="row-odd"><td>qmmm_link_qm_kind_z</td>
<td>int</td>
<td>8</td>
<td>Atomic number of QM_KIND species
(default 8)</td>
</tr>
<tr class="row-even"><td>qmmm_link_template_file</td>
<td>str</td>
<td>None</td>
<td>Filename for cp2k link atoms template
file</td>
</tr>
<tr class="row-odd"><td>qmmm_link_type</td>
<td>str</td>
<td>IMOMM</td>
<td>Type of QMMM links to create: one of
IMOMM, PSEUDO or QM_KIND. Default IMOMM</td>
</tr>
<tr class="row-even"><td>qmmm_same_lattice</td>
<td>bool</td>
<td>False</td>
<td>If true, use full original MM lattice
for QM calculation</td>
</tr>
<tr class="row-odd"><td>qmmm_use_mm_charges</td>
<td>bool</td>
<td>True</td>
<td>If true (default) use classical point
charges of atoms in QM region to
calculate total DFT charge</td>
</tr>
<tr class="row-even"><td>remove_Si_H_silica_bonds</td>
<td>bool</td>
<td>True</td>
<td>If true (default) remove any Si-H bonds
detected in silica residue</td>
</tr>
<tr class="row-odd"><td>remove_Ti_H_titania_bonds</td>
<td>bool</td>
<td>True</td>
<td>If true (default) remove any Ti-H bonds
detected in titania residue</td>
</tr>
<tr class="row-even"><td>res_num_silica</td>
<td>int</td>
<td>1</td>
<td>Residue number for silica residue</td>
</tr>
<tr class="row-odd"><td>run_suffix</td>
<td>str</td>
<td>None</td>
<td>String to append to various marks and
saved info to indicate distinct sets of
calculations or QM/MM QM regions</td>
</tr>
<tr class="row-even"><td>save_output_files</td>
<td>bool</td>
<td>True</td>
<td>If true, save the output files</td>
</tr>
<tr class="row-odd"><td>save_output_wfn_files</td>
<td>bool</td>
<td>False</td>
<td>If true, save output wavefunction files</td>
</tr>
<tr class="row-even"><td>silica_add_23_body</td>
<td>bool</td>
<td>True</td>
<td>If true and if have_silica_potential is
true, add bonds for silica 2- and
3-body terms to PSF</td>
</tr>
<tr class="row-odd"><td>silica_charge_transfer</td>
<td>float</td>
<td>2.4</td>
<td>Amount of charge transferred from Si to
O in silica bulk, per formula unit</td>
</tr>
<tr class="row-even"><td>silica_pos_dep_charges</td>
<td>bool</td>
<td>True</td>
<td>If true and if have_silica_potential is
true, use variable charges for silicon
and oxygen ions in silica residue</td>
</tr>
<tr class="row-odd"><td>tmp_run_dir_i</td>
<td>int</td>
<td>-1</td>
<td>If &gt;0, the cp2k run directory will be
/tmp/cp2k_run_$tmp_run_dir_i$, and all
input files are also copied here when
first called</td>
</tr>
<tr class="row-even"><td>topology_suffix</td>
<td>str</td>
<td>None</td>
<td>String to append to file containing
topology info (for runs that do
multiple topologies not to accidentally
reuse PSF file</td>
</tr>
<tr class="row-odd"><td>try_reuse_wfn</td>
<td>bool</td>
<td>True</td>
<td>If true, try to reuse previous
wavefunction file</td>
</tr>
<tr class="row-even"><td>use_buffer</td>
<td>bool</td>
<td>True</td>
<td>If true, use buffer as specified in
relevant hybrid_mark</td>
</tr>
<tr class="row-odd"><td>verbosity</td>
<td>str</td>
<td>NORMAL</td>
<td>Verbosity level</td>
</tr>
<tr class="row-even"><td>virial</td>
<td>str</td>
<td>None</td>
<td>If not blank, name of property to put
virial in</td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>f</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘d’) with bounds (qp_n0,qp_n1)</span></dt>
<dd></dd>
<dt><strong>n0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd><p class="first last">shape(qp_f,0)</p>
</dd>
<dt><strong>n1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd><p class="first last">shape(qp_f,1)</p>
</dd>
<dt><strong>e</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
<dt><strong>args_str</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1)</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">do_cp2k_calc</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/FilePot_drivers/cp2k_driver_module.f95">src/FilePot_drivers/cp2k_driver_module.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k_driver.read_output">
<code class="descclassname">quippy.cp2k_driver.</code><code class="descname">read_output</code><span class="sig-paren">(</span><em>at</em>, <em>qm_list_a</em>, <em>cur_qmmm_qm_abc</em>, <em>run_dir</em>, <em>proj</em>, <em>calc_qm_charges</em>, <em>do_calc_virial</em>, <em>save_reordering_index</em>, <em>n1</em>, <em>n2</em><span class="optional">[</span>, <em>out_i</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.cp2k_driver.read_output" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>qm_list_a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0)</span></dt>
<dd></dd>
<dt><strong>cur_qmmm_qm_abc</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>run_dir</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1)</span></dt>
<dd></dd>
<dt><strong>proj</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1)</span></dt>
<dd></dd>
<dt><strong>e</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
<dt><strong>f</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘d’) with bounds (qp_n1,qp_n2)</span></dt>
<dd></dd>
<dt><strong>n1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd><p class="first last">shape(qp_f,0)</p>
</dd>
<dt><strong>n2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd><p class="first last">shape(qp_f,1)</p>
</dd>
<dt><strong>calc_qm_charges</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1)</span></dt>
<dd></dd>
<dt><strong>do_calc_virial</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>save_reordering_index</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>out_i</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">read_output</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/FilePot_drivers/cp2k_driver_module.f95">src/FilePot_drivers/cp2k_driver_module.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k_driver.cp2k_state_change">
<code class="descclassname">quippy.cp2k_driver.</code><code class="descname">cp2k_state_change</code><span class="sig-paren">(</span><em>at</em>, <em>to</em>, <em>from_list</em><span class="optional">[</span>, <em>ignore_failure</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.cp2k_driver.cp2k_state_change" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>to</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1)</span></dt>
<dd></dd>
<dt><strong>from_list</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘S’) with bounds (qp_n0,(*))</span></dt>
<dd></dd>
<dt><strong>ignore_failure</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">cp2k_state_change</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/FilePot_drivers/cp2k_driver_module.f95">src/FilePot_drivers/cp2k_driver_module.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.cp2k_driver.qmmm_qm_abc">
<code class="descclassname">quippy.cp2k_driver.</code><code class="descname">qmmm_qm_abc</code><span class="sig-paren">(</span><em>at</em>, <em>qm_list_a</em>, <em>qm_vacuum</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.cp2k_driver.qmmm_qm_abc" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>qm_list_a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0)</span></dt>
<dd></dd>
<dt><strong>qm_vacuum</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_qmmm_qm_abc</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">qmmm_qm_abc</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/FilePot_drivers/cp2k_driver_module.f95">src/FilePot_drivers/cp2k_driver_module.f95</a>.</p>
</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="elasticity.html" class="btn btn-neutral float-right" title="Elasticity calculations" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2008-2016, James Kermode

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>